package cn.kepu.elearning.common;

import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter;

/**
 * @author Endy
 * @create 2019-12-04 下午8:27
 **/
public interface Constants {

    class LogicOperator {
        public static final String MUST = "must";
        public static final String MUST_NOT = "must_not";
        public static final String SHOULD = "should";

    }

    class Operator {
        public static final String TERM = "term";
        public static final String PREFIX = "prefix";
        public static final String RANGE_GT = "range:gt";
        public static final String RANGE_LT = "range:lt";
        public static final String RANGE_GTE = "range:gte";
        public static final String RANGE_LTE = "range:lte";
        public static final String BETWEEN = "between";
    }

    class Type {
        public static final String COURSE = "course";
        public static final String NEWS = "news";
        public static final String NOTICE = "notice";
        public static final String TEACHER = "teacher";
        public static final String TRAIN = "train";
        public static final String SERIES = "series";

        public static final String CLASSFICATION = "dict_classfication";
        public static final String EXPERT_AREA = "dict_expertarea";
        public static final String TRAIN_TYPE = "dict_traintype";
    }

    SimpleDateFormat ES_DATE_PATTERN = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
    DateTimeFormatter ES_TIME_PATTERN = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ");
    DateTimeFormatter ISO_TIME_PATTERN = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
}
